﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CriteriaBase.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Represents the list of columns to be returned by the query
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.DataAccess
{
    #region Imports

    using System.Collections.Generic;

    #endregion

    /// <summary>
    /// Represents the list of columns to be returned by the query
    /// </summary>
    public class QueryColumnCollection : List<string>
    {
    }

    /// <summary>
    /// The criteria base.
    /// </summary>
    public class CriteriaBase
    {
        #region Fields

        /// <summary>
        /// The sort param collection.
        /// </summary>
        private readonly SortParamCollection sortParamCollection = new SortParamCollection();

        /// <summary>
        /// The collection of columns to retrieve from the database
        /// </summary>
        private QueryColumnCollection columns = new QueryColumnCollection();

        #endregion

        #region Properties

        /// <summary>
        /// Gets the collection of columns to pull from the data store.
        /// </summary>
        /// <value>The columns.</value>
        public QueryColumnCollection Columns
        {
            get
            {
                return columns;
            }
        }
        
        /// <summary>
        /// Gets or sets StartRow.
        /// </summary>
        public uint StartRow
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets RowLimit.
        /// </summary>
        public uint RowLimit
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets ViewName.
        /// </summary>
        public string ViewName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets Id.
        /// </summary>
        public long Id
        {
            get;
            set;
        }

        /// <summary>
        /// Gets SortParamCollection.
        /// </summary>
        public SortParamCollection SortParamCollection
        {
            get
            {
                return this.sortParamCollection;
            }
        }

        #endregion
    }
}